package com.yaoyong.yy_demo.module.quartz;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 工作类
 * @author 姚勇
 *
 */
public class HelloJob implements Job {

	public void myLogic(){
		SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd hh:mm:ss");
		System.out.println("hello调度程序已执行"+sdf.format(new Date()));
	}

	@Override
	public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
		myLogic();
	}
}
